gtk4.git
8 years agoFix irregular gdk_frame_clock_get_frame_time
Daniel van Vugt [Fri, 15 Sep 2017 09:49:12 +0000 (17:49 +0800)]
Fix irregular gdk_frame_clock_get_frame_time

This fixes stuttering in animations that rely on the regularity of
gdk_frame_clock_get_frame_time.

https://bugzilla.gnome.org/show_bug.cgi?id=787665

BEFORE
gdkgears:
58 FPS and visibly stuttering
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +17278μs, gdk_frame_clock_get_frame_time +17278μs
"paint" g_get_monotonic_time +17449μs, gdk_frame_clock_get_frame_time +17426μs
"paint" g_get_monotonic_time +17620μs, gdk_frame_clock_get_frame_time +17600μs

AFTER
gdkgears:
60 FPS and smoother
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +18228μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +15010μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +17134μs, gdk_frame_clock_get_frame_time +16680μs

8 years agodnd: Remove "delete" argument from gtk_drag_finish()
Benjamin Otte [Sun, 10 Dec 2017 00:33:38 +0000 (01:33 +0100)]
dnd: Remove "delete" argument from gtk_drag_finish()

The argument is ignored by anything but X11.
It's treated like suggested_action == MOVE.

So do that in gtk_drag_finish(), too.

8 years agodnd: Introduce gdk_drop_read_async() and use it
Benjamin Otte [Sun, 10 Dec 2017 00:05:37 +0000 (01:05 +0100)]
dnd: Introduce gdk_drop_read_async() and use it

This is the replacement for selection usage.

Backend implementations for X11 (missing support for backwards compat
formats like COMPOUND_TEXT) and Wayland are included.

GTK code should be adapted to use gdk_drop_read_*() functions instead
of gtk_drag_get_data().

8 years agogdk: Fix wrong usage of g_task_propagate_pointer()
Benjamin Otte [Sun, 10 Dec 2017 00:04:32 +0000 (01:04 +0100)]
gdk: Fix wrong usage of g_task_propagate_pointer()

The return value is transfer full, not transfer none.

8 years agoclipboard: Add the useful stuff from reverted commit
Benjamin Otte [Tue, 5 Dec 2017 04:16:49 +0000 (05:16 +0100)]
clipboard: Add the useful stuff from reverted commit

This is the parts of dc50e0637ffa8bc7a369d00a5d8e7656d03c3781 that
should have been committed but were reverted in
b5c62cf86fe37e05ce2a0ae050df2a229457676b to unbreak the build.

8 years agodnd: Add gdk_drag_context_get_display()
Benjamin Otte [Tue, 5 Dec 2017 16:30:58 +0000 (17:30 +0100)]
dnd: Add gdk_drag_context_get_display()

Also turn it into a readable, construct-only property.

Every GDK object should have this. (Apart from GdkDisplay, obviously.)

8 years agogdk: Include gio.h in gdktypes.h
Benjamin Otte [Tue, 5 Dec 2017 14:44:00 +0000 (15:44 +0100)]
gdk: Include gio.h in gdktypes.h

It's where we include all our external dependencies.

This way, we don't have to include it in all headers again and again.

8 years agogtkwindow: Allow edge resizing from corners if constraints forbid either side
Carlos Garnacho [Sat, 9 Dec 2017 20:13:05 +0000 (21:13 +0100)]
gtkwindow: Allow edge resizing from corners if constraints forbid either side

The fix is twofold. First, when checking that a corner is resizable, we must
check the constraints on both edges. Second, when checking either edge we
must include both perpendicular sides in order to allow those to be
resizable when the constraint does not allow resizing the edge being
checked.

8 years agogtkwindow: Use shadow border when calculating resize areas positions
Carlos Garnacho [Sat, 9 Dec 2017 16:33:44 +0000 (17:33 +0100)]
gtkwindow: Use shadow border when calculating resize areas positions

This way resize areas are correctly positioned right outside the visible
window edge on all sides.

8 years agogtkwindow: Do not account handle size when checking content area
Carlos Garnacho [Sat, 9 Dec 2017 16:32:02 +0000 (17:32 +0100)]
gtkwindow: Do not account handle size when checking content area

This is necessary to bring back the L-shaped resize corners. On all edges
(not corners) the handle width is determined by the border size.

8 years agoFix some parameter name mismatches to make g-ir-scanner happier
Rico Tzschichholz [Sat, 9 Dec 2017 14:36:35 +0000 (15:36 +0100)]
Fix some parameter name mismatches to make g-ir-scanner happier

8 years agoSwitch the order for cursor lookup
Matthias Clasen [Sat, 9 Dec 2017 13:33:21 +0000 (08:33 -0500)]
Switch the order for cursor lookup

When looking for the cursor to apply, start from the innermost
widget and go up. This is the right behavior for cases like
entry icons. The top-down order we were using so far is the
right behavior for cases like global wait cursors. Since we
have entry icons in gtk, but not global wait cursors, lets
pick the other order for now.

8 years agotreeview: Don't draw background twice
Timm Bäder [Fri, 8 Dec 2017 15:46:46 +0000 (16:46 +0100)]
treeview: Don't draw background twice

This is done unconditionally for all widgets these days.

8 years agorecorder: Show rounded clip node corner size info
Timm Bäder [Wed, 6 Dec 2017 14:54:19 +0000 (15:54 +0100)]
recorder: Show rounded clip node corner size info

8 years agosnapshot: Don't create blur nodes with radius 0
Timm Bäder [Fri, 8 Dec 2017 15:58:06 +0000 (16:58 +0100)]
snapshot: Don't create blur nodes with radius 0

8 years agosnapshot: Collapse color matrix nodes
Timm Bäder [Wed, 6 Dec 2017 14:53:15 +0000 (15:53 +0100)]
snapshot: Collapse color matrix nodes

Color matrix nodes as the child of other color matrix nodes can happen
quite frequently as a result of CSS. To ease the renderer
implementations, collapse chains of color matrix nodes into one.

8 years agoFix a few overlooked casts
Timm Bäder [Sat, 9 Dec 2017 12:14:00 +0000 (13:14 +0100)]
Fix a few overlooked casts

glib warns about these now.

8 years agopaned: Grab during the drag
Matthias Clasen [Sat, 9 Dec 2017 02:09:24 +0000 (21:09 -0500)]
paned: Grab during the drag

This is necessary to ensure we get the right cursor.

8 years agocssshadowvalue: don't apply the y_scale offset twice to the shadow
Marco Trevisan (Treviño) [Thu, 7 Dec 2017 22:00:01 +0000 (17:00 -0500)]
cssshadowvalue: don't apply the y_scale offset twice to the shadow

As per commit 942e904 this changed causing a regression that
seems to be visible only when scale > 2.

https://bugzilla.gnome.org/show_bug.cgi?id=791363

8 years agoFix fallout from g_object_ref change
Matthias Clasen [Fri, 8 Dec 2017 22:48:47 +0000 (17:48 -0500)]
Fix fallout from g_object_ref change

g_object_ref now returns the type of the object that was
passed. Introduce cast as necessary to avoid warnings due
to this.

8 years agocss node tests: Update expected output
Timm Bäder [Fri, 8 Dec 2017 20:07:41 +0000 (21:07 +0100)]
css node tests: Update expected output

8 years agoFix fallout from the show-close-button rename
Matthias Clasen [Fri, 8 Dec 2017 16:29:14 +0000 (11:29 -0500)]
Fix fallout from the show-close-button rename

I had overlooked ui files. We should really
validate those during build.

8 years agomir: Fix potential use of NULL GDBusConnection
Philip Withnall [Fri, 17 Nov 2017 10:32:02 +0000 (10:32 +0000)]
mir: Fix potential use of NULL GDBusConnection

If we fail to connect to the session bus, it would be a bit silly to
immediately try and use that NULL connection.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=668590

8 years agoRename GtkHeaderBar::show-close-button
Matthias Clasen [Fri, 8 Dec 2017 03:36:29 +0000 (22:36 -0500)]
Rename GtkHeaderBar::show-close-button

It is about all window buttons, so rename it to ::show-title-buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=779862

8 years agowayland: Destroy the xdg_imported after the wl_surface
Jonas Ådahl [Fri, 1 Dec 2017 08:03:34 +0000 (16:03 +0800)]
wayland: Destroy the xdg_imported after the wl_surface

This way the window manager can handle destruction while having the
transient-for relationship still valid.

https://bugzilla.gnome.org/show_bug.cgi?id=791062

8 years agowayland: Maybe postpone xdg-foreign state setup until mapping
Jonas Ådahl [Fri, 1 Dec 2017 04:18:30 +0000 (12:18 +0800)]
wayland: Maybe postpone xdg-foreign state setup until mapping

In order to map a window with the correct initial parent-child
relationship when a modal dialog is set up to be a child of an imported
foreign window, the relationship must be set up before the window is
mapped.

In order to do this, if a window is not yet mapped, postpone the
relationship setup until when the window is eventually mapped.

https://bugzilla.gnome.org/show_bug.cgi?id=791062

8 years agoplacesview: Present FUSE-reachable network shares in Other Locations
Colin Leroy [Tue, 12 Sep 2017 13:32:36 +0000 (15:32 +0200)]
placesview: Present FUSE-reachable network shares in Other Locations

The documentation about gtk_file_chooser_set_local_only() states
that "non-native files may still be available using the native
filesystem via a userspace filesystem (FUSE)."
The code that made this possible in GTK+2 was missing from GTK+3 and
that represented a regression for Linux users in numerous applications
(Firefox, Thunderbird, Chromium, ...)

https://bugzilla.gnome.org/show_bug.cgi?id=787128

8 years agogdk: Add GDK_SEAT_CAPABILITY_TABLET_PAD
Carlos Garnacho [Mon, 27 Nov 2017 20:39:05 +0000 (21:39 +0100)]
gdk: Add GDK_SEAT_CAPABILITY_TABLET_PAD

Tablet pads don't adapt really well to any other capability, so add a
distinct one to be able to query those properly.

https://bugzilla.gnome.org/show_bug.cgi?id=790920

8 years agogdk: Add gdk_seat_get_master_pointers()
Carlos Garnacho [Mon, 27 Nov 2017 19:21:42 +0000 (20:21 +0100)]
gdk: Add gdk_seat_get_master_pointers()

Traditionally (and on most backends) there's a single master pointer driven
by all pointing devices. The notable exception is Wayland though, where
master pointing devices are created per capability in the case of
pointer/touch, and one for each drawing tablet.

This function call makes it easy to access all these.

https://bugzilla.gnome.org/show_bug.cgi?id=790920

8 years agoMove editing to button release
Matthias Clasen [Fri, 8 Dec 2017 02:25:10 +0000 (21:25 -0500)]
Move editing to button release

This will free up primary button press for drags.

8 years agoMake sure stopped spinner stay visible
Matthias Clasen [Thu, 7 Dec 2017 04:49:03 +0000 (23:49 -0500)]
Make sure stopped spinner stay visible

This demo needs stopped spinners to be visible,
so the user can interact with them.

8 years agoFix a typo in the docs
Matthias Clasen [Thu, 7 Dec 2017 04:39:27 +0000 (23:39 -0500)]
Fix a typo in the docs

8 years agoAdd a Cut menuitem to the dnd demo
Matthias Clasen [Thu, 7 Dec 2017 04:36:35 +0000 (23:36 -0500)]
Add a Cut menuitem to the dnd demo

8 years agoMore work on the dnd demo
Matthias Clasen [Thu, 7 Dec 2017 04:10:56 +0000 (23:10 -0500)]
More work on the dnd demo

Still no dnd in the drag-and-drop demo...

8 years agopaned: Restrict picking to allocation
Timm Bäder [Wed, 6 Dec 2017 07:23:03 +0000 (08:23 +0100)]
paned: Restrict picking to allocation

Same reason as GtkViewport does it: We might allocate child widgets
outside of the paned's content allocation. For drawing, we add a clip
node.

This was causing the "Record" button in the inspector recorder to ignore
pointer events since the treeview column header label in the GtkPaned
was swallowing it.

8 years agoRemove all gtk_widget_get_content_size usages
Timm Bäder [Wed, 6 Dec 2017 06:56:12 +0000 (07:56 +0100)]
Remove all gtk_widget_get_content_size usages

And remove the function itself. Make everything use gtk_widget_get_width
and gtk_widget_get_height instead.

8 years agoAdd some copy-paste for widgets demo
Matthias Clasen [Wed, 6 Dec 2017 01:45:39 +0000 (17:45 -0800)]
Add some copy-paste for widgets demo

Not sure this is quite right yet.

8 years agoStart a dnd demo
Matthias Clasen [Wed, 6 Dec 2017 00:22:06 +0000 (16:22 -0800)]
Start a dnd demo

Nothing to see yet.

8 years agoUpdate gtk docs for recent changes
Matthias Clasen [Tue, 5 Dec 2017 16:56:09 +0000 (08:56 -0800)]
Update gtk docs for recent changes

Clipboards are gone, textures appear...

8 years agoDrop get/set_scale_factor from gsk docs
Matthias Clasen [Tue, 5 Dec 2017 16:37:18 +0000 (08:37 -0800)]
Drop get/set_scale_factor from gsk docs

They no longer exist.

8 years agobroadway: Add broadway_server_lookup_surface helper
Alexander Larsson [Tue, 5 Dec 2017 15:10:06 +0000 (16:10 +0100)]
broadway: Add broadway_server_lookup_surface helper

8 years agobroadway: Make the use of next_texture_id clearer
Alexander Larsson [Tue, 5 Dec 2017 14:54:36 +0000 (15:54 +0100)]
broadway: Make the use of next_texture_id clearer

It used to actually be pre-incremented, so meant like "one before
next id".

8 years agobroadway: Use "surface" instead of window/toplevel for browser object
Alexander Larsson [Tue, 5 Dec 2017 13:38:57 +0000 (14:38 +0100)]
broadway: Use "surface" instead of window/toplevel for browser object

Als fixes indentation/tabs and removes some unused code.

8 years agobroadway: Remove references to unused BROADWAY_EVENT_DELETE_NOTIFY
Alexander Larsson [Tue, 5 Dec 2017 13:32:56 +0000 (14:32 +0100)]
broadway: Remove references to unused BROADWAY_EVENT_DELETE_NOTIFY

8 years agobroadway: Remove now unused toplevel surface
Alexander Larsson [Mon, 4 Dec 2017 14:04:48 +0000 (15:04 +0100)]
broadway: Remove now unused toplevel surface

8 years agoautocleanups: allow g_autoptr() usage with GtkTreePath
Christian Hergert [Tue, 5 Dec 2017 03:22:40 +0000 (19:22 -0800)]
autocleanups: allow g_autoptr() usage with GtkTreePath

As the summary says, this allows using g_autoptr(GtkTreePath). This is
useful for API that uses out parameters for GtkTreePath that need to be
freed.

https://bugzilla.gnome.org/show_bug.cgi?id=791234

8 years agoEnsure that the path is always set
Emmanuele Bassi [Tue, 5 Dec 2017 11:07:46 +0000 (11:07 +0000)]
Ensure that the path is always set

We are using `path` unconditionally, but it can be conditionally filled.
To avoid inconsistent internal state, and a compiler warning, let's
assert that the variable is always set.

8 years agoFix the build
Emmanuele Bassi [Tue, 5 Dec 2017 11:02:20 +0000 (11:02 +0000)]
Fix the build

Use the right argument name in the preconditions check.

8 years agogdk: Documentation improvements
Matthias Clasen [Tue, 5 Dec 2017 07:52:48 +0000 (23:52 -0800)]
gdk: Documentation improvements

8 years agodocs: Drop some no longer existing functions
Matthias Clasen [Tue, 5 Dec 2017 04:38:04 +0000 (20:38 -0800)]
docs: Drop some no longer existing functions

8 years agoRevert "clipboard: Add gdk_clipboard_set()"
Matthias Clasen [Tue, 5 Dec 2017 07:09:54 +0000 (23:09 -0800)]
Revert "clipboard: Add gdk_clipboard_set()"

This reverts commit dc50e0637ffa8bc7a369d00a5d8e7656d03c3781.

This broke the build.

8 years agoclipboard: Add gdk_clipboard_set()
Benjamin Otte [Tue, 5 Dec 2017 04:16:49 +0000 (05:16 +0100)]
clipboard: Add gdk_clipboard_set()

This API allows specifying a GType and va_args of a value of that type
to set the clipboard contents. This massively simplifies setting weird
object types into the clipboard.
2 example patches included in this patch are the GtkTextBuffer and the
file list in the file chooser.

Using gobject-introspection, this should work without specifying the
type, so that you can literlally say
  clipboard.set ("Hello World")
or
  clipboard.set (pixbuf)
which is why I've also marked all other setters as (skip). They just
exist in C as wrappers for type safety reasons.

8 years agodnd: Remove x/y coordinates from drag-data-received
Benjamin Otte [Tue, 5 Dec 2017 03:06:20 +0000 (04:06 +0100)]
dnd: Remove x/y coordinates from drag-data-received

This is in preparation of using input streams to show that these
coordinates aren't needed most of the time and can otherwise be saved
during GtkWidget::drag-drop.

8 years agoExpand the docs
Matthias Clasen [Tue, 5 Dec 2017 00:18:24 +0000 (16:18 -0800)]
Expand the docs

Cross-reference the serializers.

8 years agoDocument gdk_content_provider_contents_changed
Matthias Clasen [Tue, 5 Dec 2017 00:08:32 +0000 (16:08 -0800)]
Document gdk_content_provider_contents_changed

8 years agogdk: Expand the clipboard documentation
Matthias Clasen [Tue, 5 Dec 2017 00:06:02 +0000 (16:06 -0800)]
gdk: Expand the clipboard documentation

8 years agogdk: Fill in some blanks in the docs
Matthias Clasen [Mon, 4 Dec 2017 23:58:30 +0000 (15:58 -0800)]
gdk: Fill in some blanks in the docs

This is just an initial cut; more work is needed.

8 years agoAdd a long description for GdkTexture
Matthias Clasen [Mon, 4 Dec 2017 19:04:02 +0000 (11:04 -0800)]
Add a long description for GdkTexture

8 years agoMove GdkGrabStatus docs
Matthias Clasen [Mon, 4 Dec 2017 18:35:51 +0000 (10:35 -0800)]
Move GdkGrabStatus docs

This enum was the odd man out in the initialization docs.
Move it to GdkSeat where grabbing happens nowadays.

8 years agoAdd new stuff to the gdk docs
Matthias Clasen [Mon, 4 Dec 2017 18:03:40 +0000 (10:03 -0800)]
Add new stuff to the gdk docs

Document all the things.

8 years agoFix the gdk doc build
Matthias Clasen [Mon, 4 Dec 2017 18:00:44 +0000 (10:00 -0800)]
Fix the gdk doc build

Some types don't exist anymore.

8 years agoswitch: Remove unused variable
Timm Bäder [Mon, 4 Dec 2017 11:52:50 +0000 (12:52 +0100)]
switch: Remove unused variable

8 years agowayland: Initialize variable
Benjamin Otte [Mon, 4 Dec 2017 17:28:14 +0000 (18:28 +0100)]
wayland: Initialize variable

Otherwise we get NULL-warnings when we try to use (read: unref) it.

8 years agoactionbar: Add more docs for gtk_action_bar_get_revealed
Matthias Clasen [Fri, 1 Dec 2017 23:01:57 +0000 (15:01 -0800)]
actionbar: Add more docs for gtk_action_bar_get_revealed

This stops gtk-doc complaints.

8 years agoabout dialog: Add some missing docs
Matthias Clasen [Fri, 1 Dec 2017 23:00:39 +0000 (15:00 -0800)]
about dialog: Add some missing docs

gtk_about_dialog_set/get_system_information are new,
and were missing docs.

8 years agodocs: Remove gtk_application_is_inhibited
Matthias Clasen [Fri, 1 Dec 2017 22:58:33 +0000 (14:58 -0800)]
docs: Remove gtk_application_is_inhibited

It doesn't exist anymore.

8 years agoRemove some more gtk_widget_get_content_size uses
Timm Bäder [Mon, 4 Dec 2017 11:42:52 +0000 (12:42 +0100)]
Remove some more gtk_widget_get_content_size uses

8 years agowidgetbowl: Add some more widget types
Timm Bäder [Sun, 3 Dec 2017 18:03:48 +0000 (19:03 +0100)]
widgetbowl: Add some more widget types

8 years agotestswitch: Remove unnecessary gtk_widget_show calls
Timm Bäder [Sat, 2 Dec 2017 10:27:02 +0000 (11:27 +0100)]
testswitch: Remove unnecessary gtk_widget_show calls

8 years agoimage: Stop using gtk_widget_get_content_size
Timm Bäder [Mon, 4 Dec 2017 11:14:21 +0000 (12:14 +0100)]
image: Stop using gtk_widget_get_content_size

8 years agopopover: Stop using gtk_widget_get_content_size
Timm Bäder [Thu, 23 Nov 2017 10:29:47 +0000 (11:29 +0100)]
popover: Stop using gtk_widget_get_content_size

8 years agospinner: Stop using gtk_widget_get_content_size
Timm Bäder [Sun, 3 Dec 2017 18:00:09 +0000 (19:00 +0100)]
spinner: Stop using gtk_widget_get_content_size

8 years agogsk: Remove gsk_render_node_set_scaling_filters()
Benjamin Otte [Sun, 3 Dec 2017 20:56:24 +0000 (21:56 +0100)]
gsk: Remove gsk_render_node_set_scaling_filters()

This is a leftover from the very early rendernode that we forgot to delete.

This can be seen by the fact that it is settable on an immutable object.

8 years agoUse Unicode quotation marks in new strings
Piotr Drąg [Sun, 3 Dec 2017 17:38:39 +0000 (18:38 +0100)]
Use Unicode quotation marks in new strings

See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772371

8 years agoUpdate POTFILES.in
Piotr Drąg [Sun, 3 Dec 2017 17:24:36 +0000 (18:24 +0100)]
Update POTFILES.in

8 years agoGDK W32: Remove stray debug code
Руслан Ижбулатов [Sun, 3 Dec 2017 06:08:44 +0000 (06:08 +0000)]
GDK W32: Remove stray debug code

I have no idea how this slipped into master (these two lines are not present
in the same commit that went into gtk-3-22).

8 years agodnd: Remove unused variables
Benjamin Otte [Sun, 3 Dec 2017 05:50:51 +0000 (06:50 +0100)]
dnd: Remove unused variables

8 years agoRemove GdkDragProtocol from the api
Matthias Clasen [Thu, 24 Aug 2017 21:40:16 +0000 (17:40 -0400)]
Remove GdkDragProtocol from the api

...together with apis that return it. We were not using this
information in GTK+ at all, so no need to provide it.

8 years agoDrop api that is only for unmanaged dnd
Matthias Clasen [Thu, 24 Aug 2017 18:30:47 +0000 (14:30 -0400)]
Drop api that is only for unmanaged dnd

These functions are not needed as public api anymore.

8 years agodnd: Handle rootwin drop in gdk
Matthias Clasen [Sun, 3 Dec 2017 05:22:25 +0000 (06:22 +0100)]
dnd: Handle rootwin drop in gdk

This lets us drop the only use of the drag protocol in gtk.

8 years agodnd: Remove much of the unmanaged dnd
Matthias Clasen [Wed, 23 Aug 2017 19:50:17 +0000 (15:50 -0400)]
dnd: Remove much of the unmanaged dnd

8 years agowayland: Add primary clipboard subclass
Benjamin Otte [Sun, 3 Dec 2017 04:39:08 +0000 (05:39 +0100)]
wayland: Add primary clipboard subclass

I decided to put this in a custom subclass, because then I could keep
the whole gtk primary protocol self-contained.

The other option would have been reusing GdkWaylandClipboard, but that
didn't seem worth it, especially because that code needs to interact
with the DND machinery, while the primary doesn't.

8 years agowayland: Implement taking over the clipboard
Benjamin Otte [Sun, 3 Dec 2017 02:51:43 +0000 (03:51 +0100)]
wayland: Implement taking over the clipboard

The clipboard is now complete.
That was fast.

8 years agowayland: Implement reading the clipboard
Benjamin Otte [Sun, 3 Dec 2017 01:48:17 +0000 (02:48 +0100)]
wayland: Implement reading the clipboard

We now keep track of what's in the clipboard and allow people to read
its contents.

8 years agowayland: Add skeleton for a GdkClipboardWayland
Benjamin Otte [Sat, 2 Dec 2017 20:54:36 +0000 (21:54 +0100)]
wayland: Add skeleton for a GdkClipboardWayland

Creates the source file and a custom subclass and makes sure it's used
by GDK.

8 years agogdk: Get rid of owner change events
Benjamin Otte [Sat, 2 Dec 2017 15:05:53 +0000 (16:05 +0100)]
gdk: Get rid of owner change events

They're unused now.

8 years agogtk: Remove GtkClipboard
Benjamin Otte [Sat, 2 Dec 2017 14:42:12 +0000 (15:42 +0100)]
gtk: Remove GtkClipboard

8 years agoicon-browser: Port to new clipboard
Benjamin Otte [Sat, 2 Dec 2017 14:41:22 +0000 (15:41 +0100)]
icon-browser: Port to new clipboard

8 years agogtk-demo: Port to GdkClipboard
Benjamin Otte [Sat, 2 Dec 2017 13:39:37 +0000 (14:39 +0100)]
gtk-demo: Port to GdkClipboard

8 years agoclipboard: Change image convenience APIs
Benjamin Otte [Sat, 2 Dec 2017 13:38:57 +0000 (14:38 +0100)]
clipboard: Change image convenience APIs

Don't use pixbufs anymore, use textures.

8 years agogdk: Add (de)serializers for GDK_TYPE_TEXTURE
Benjamin Otte [Sat, 2 Dec 2017 13:36:57 +0000 (14:36 +0100)]
gdk: Add (de)serializers for GDK_TYPE_TEXTURE

We want to use textures more, so we should be able to use them for
copy/paste and dnd.

8 years agox11: Handle case where clipboard was reclaimed quickly
Benjamin Otte [Fri, 1 Dec 2017 06:42:36 +0000 (07:42 +0100)]
x11: Handle case where clipboard was reclaimed quickly

When the reply to a TARGETS request comes in, the clipboard may already
be reclaimed by the local app. Deal with that case (in an ugly way,
strictly speaking we should use a cancellable here).

This happens for example at startup when the initial TARGETS requests
have not been answered until after the main widow popped up. And if such
a window immediately claims the primary clipboard (like when the initial
focus is inside an entry), this race will happen.

8 years agoentry: Port to GdkClipboard
Benjamin Otte [Fri, 1 Dec 2017 06:21:21 +0000 (07:21 +0100)]
entry: Port to GdkClipboard

8 years agox11: Implement storing the clipboard
Benjamin Otte [Fri, 1 Dec 2017 05:20:28 +0000 (06:20 +0100)]
x11: Implement storing the clipboard

8 years agox11: Implement MULTIPLE requests
Benjamin Otte [Fri, 1 Dec 2017 05:06:53 +0000 (06:06 +0100)]
x11: Implement MULTIPLE requests

8 years agotests: Don't crash if widgets go away before clipboard
Benjamin Otte [Fri, 1 Dec 2017 05:05:07 +0000 (06:05 +0100)]
tests: Don't crash if widgets go away before clipboard

Don't g_signal_connect() to the clipboard without protection - the
clipboard might outlast you and still emit signals.

8 years agox11: Introduce GdkX11PendingSelectionNotify
Benjamin Otte [Fri, 1 Dec 2017 01:53:47 +0000 (02:53 +0100)]
x11: Introduce GdkX11PendingSelectionNotify

This object tracks the SelectionNotifyEvent that has to be sent in
response to a SelectionRequest.

Currently it just looks like code reshuffling, but it's a prerequisite
for handling MULTIPLE, which requires to only send the notify after
every stream has writtten at least once.

But anyway, code is cleaner now, so it's a win!

8 years agox11: Split out a function
Benjamin Otte [Thu, 30 Nov 2017 23:02:12 +0000 (00:02 +0100)]
x11: Split out a function

This will be necessary for MULTIPLE handling.

8 years agomain: Implement storing all clipboards
Benjamin Otte [Thu, 30 Nov 2017 00:05:02 +0000 (01:05 +0100)]
main: Implement storing all clipboards

8 years agoapplication: Put shared code into a common function
Benjamin Otte [Wed, 29 Nov 2017 23:09:37 +0000 (00:09 +0100)]
application: Put shared code into a common function